package rmi.server;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.HashMap;

import model.PlayerGameStatsInterface;
import model.PlayerInterface;
import model.UserInterface;
import rmi.client.Client;
import data.GameInterface;
import data.SessionInterface;
import exception.GameException;
import exception.LoginException;

public interface Server extends Remote
{
	public ArrayList<GameInterface> getGameList() throws RemoteException;

	public void addClient(Client client) throws LoginException, RemoteException;
	
	public SessionInterface watchGame(int gameId, UserInterface user) throws RemoteException;
	
	public void joinGame(int gameId, PlayerInterface player, int seatIndex) throws GameException, RemoteException;
	
	public void leaveGame(int gameId, UserInterface user) throws RemoteException;
	
	public PlayerGameStatsInterface getPlayerStatistics(int gameId, PlayerInterface player) throws RemoteException;
	
	public void sendChatMessage(int gameId, UserInterface user, String message) throws RemoteException;
}
